﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage_Admin.master" AutoEventWireup="true"
    CodeFile="search.aspx.cs" Inherits="admin_Default" Title="IT110：不良信息举报与检索平台 - 查询信息管理 - By ECountry.Ltd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder_Search" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="width: 100%; text-align: center">
                <asp:Label ID="Label1" runat="server" Text="**综合查询信息管理中心**" Font-Bold="True" Font-Size="Large"
                    ForeColor="#000066"></asp:Label>
            </div>
            请选择信息类型：
            <asp:DropDownList ID="DropDownList_type" runat="server" AppendDataBoundItems="True"
                AutoPostBack="True" DataSourceID="ObjectDataSource_type" DataTextField="type"
                DataValueField="id">
                <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
            </asp:DropDownList>
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="ObjectDataSource_search"
                Width="100%" PageSize="20" CellPadding="4" ForeColor="#333333" GridLines="None"
                OnRowDataBound="GridView1_RowDataBound">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <Columns>
                    <asp:BoundField DataField="type" HeaderText="分类" SortExpression="type">
                        <ItemStyle Width="60px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id"
                        Visible="False" />
                    <asp:BoundField DataField="object" HeaderText="名称" SortExpression="object">
                        <ItemStyle Width="80px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="IP_from" HeaderText="来源地址" SortExpression="IP_from" />
                    <asp:BoundField DataField="IP" HeaderText="IP" SortExpression="IP">
                        <ItemStyle Width="70px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="MAC" HeaderText="MAC" SortExpression="MAC" Visible="False">
                        <ItemStyle Width="65px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Client_Name" HeaderText="机器名" SortExpression="Client_Name"
                        Visible="False" />
                    <asp:BoundField DataField="Client_OS" HeaderText="操作系统" SortExpression="Client_OS">
                        <ItemStyle Width="70px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Client_Browse" HeaderText="浏览器" SortExpression="Client_Browse">
                        <ItemStyle Width="70px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" Visible="False" />
                    <asp:BoundField DataField="time" DataFormatString="{0:d}" HeaderText="日期" SortExpression="time">
                        <ItemStyle HorizontalAlign="Center" Width="70px" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="Delete_flag" HeaderText="禁用" SortExpression="Delete_flag">
                        <ItemStyle HorizontalAlign="Center" Width="35px" ForeColor="Red" />
                    </asp:CheckBoxField>
                    <asp:BoundField DataField="userid" HeaderText="userid" SortExpression="userid" Visible="False" />
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" CommandName="Update"
                                Text='<%# Convert.ToBoolean(Eval("Delete_flag")) ==false?"启用":"<font color=red>禁用</font>" %>'
                                ToolTip="单击“启用/禁用”本条记录！"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="35px" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                Text="删除" OnClientClick="javascript:return confirm('您确定要删除该记录吗? 您将无法恢复！');"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle ForeColor="#660033" HorizontalAlign="Center" Width="35px" />
                    </asp:TemplateField>
                </Columns>
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle HorizontalAlign="Center" BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:ObjectDataSource ID="ObjectDataSource_type" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="Get_Data_OrderBy_id" TypeName="DataSet_fp_DyhTableAdapters.Dyh_typeTableAdapter">
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource_search" runat="server" DeleteMethod="Delete"
        OldValuesParameterFormatString="original_{0}" SelectMethod="Get_Union_Data_By_Type_For_Admin"
        TypeName="DataSet_fp_DyhTableAdapters.Dyh_searchTableAdapter" UpdateMethod="Update_Delete_Flag_Query_By_Id">
        <DeleteParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList_type" Name="type" PropertyName="SelectedValue"
                Type="Byte" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
